#include<bits/stdc++.h>

using namespace std;

//打印矩形 可以AC哦
int main() {
    int h, w, x, y;
    while (cin >> h >> w) {
        if (h == 0 && w == 0)break;
        for (x = 1; x <= h; x++) {
            for (y = 1; y <= w; y++) {
                cout << "#";
            }
            cout << endl;
        }
        cout << endl;
    }
    return 0;
}
